import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: 'login'
  },
  {
    path: '/login',
    name: 'login',
    component: () => import(/* webpackChunkName: "about" */ '../views/Login.vue')
  },
  {
    path: '/layout',
    name: 'layout',
    redirect: '/layout/yonghuguanli/yonghuliebiao',
    component: () => import(/* webpackChunkName: "about" */ '../views/Layout.vue'),
    children: [
      //用户管理
      {//用户列表
        path: '/layout/yonghuguanli/yonghuliebiao',
        name: 'yonghuliebiao',
        component: () => import(/* webpackChunkName: "about" */ '../views/menu/yonghuguanli/Userlist'),
      },
      {//用户列表
        path: '/layout/yonghuguanli/persondetail',
        name: 'persondetail',
        component: () => import(/* webpackChunkName: "about" */ '../views/menu/yonghuguanli/person/Persondetail'),
      },
      //赏品等级
      {
        path: '/layout/choushangguanli/shangpindengjishezhi',
        name: 'shangpindengjishezhi',
        component: () => import('../views/menu/choushangguanli/Shangpindengjishezhi.vue')
      },
      //添加修改赏品等级
      {
        path: '/layout/choushangguanli/addgoodslevel',
        name: 'addgoodslevel',
        component: () => import('../views/menu/choushangguanli/shangpindengji/Tianjiaquanjumethod.vue')
      },
      //一番赏列表
      {
        path: '/layout/choushangguanli/yifanshang',
        name: 'yifanshang',
        component: () => import('../views/menu/choushangguanli/Yifanshang.vue')
      },
      // 添加一番赏
      {
        path: '/layout/choushangguanli/tianjiayifanshang',
        name: 'tianjiayifanshang',
        component: () => import('../views/menu/choushangguanli/yifanshang/Tianjiayifanshang.vue')
      },
      // 一番赏赏品
      {
        path: '/layout/choushangguanli/yifanshanggoods',
        name: 'yifanshanggoods',
        component: () => import('../views/menu/choushangguanli/yifanshang/YifanshangGoodsList.vue')
      },
      // 添加一番赏赏品
      {
        path: '/layout/choushangguanli/addyifanshanggoods',
        name: 'addyifanshanggoods',
        component: () => import('../views/menu/choushangguanli/yifanshang/Tianjiayifanshanggoods.vue')
      },
      //无限池列表
      {
        path: '/layout/choushangguanli/wuxianchi',
        name: 'wuxianchi',
        component: () => import('../views/menu/choushangguanli/Wuxianchi.vue')
      },
      {
        path: '/layout/choushangguanli/wuxianchiyixuan',
        name: 'wuxianchiyixuan',
        component: () => import('../views/menu/choushangguanli/wuxianchi/Wuxianchiyixuan.vue')
      },
      // 无限赏赏品列表
      {
        path: '/layout/choushangguanli/wuxianchigoods',
        name: 'wuxianchigoods',
        component: () => import('../views/menu/choushangguanli/wuxianchi/Wuxianchigoods')
      },
      // 添加无限赏赏品
      {
        path: '/layout/choushangguanli/addwuxianchigoods',
        name: 'addwuxianchigoods',
        component: () => import('../views/menu/choushangguanli/wuxianchi/Addwuxianchigoods')
      },
      // 添加无限池盒子
      {
        path: '/layout/choushangguanli/tianjiawuxianshang',
        name: 'tianjiawuxianshang',
        component: () => import('../views/menu/choushangguanli/Tianjiawuxianshang.vue')
      },
      //全局赏列表
      {
        path: '/layout/choushangguanli/quanjushang',
        name: 'quanjushang',
        component: () => import('../views/menu/choushangguanli/Quanjushang.vue')
      },
      // 添加全局赏
      {
        path: '/layout/choushangguanli/tianjiaquanjushang',
        name: 'tianjiaquanjushang',
        component: () => import('../views/menu/choushangguanli/quanjushangx/Tianjiaquanjushang.vue')
      },
      // 全局赏下的赏品
      {
        path: '/layout/choushangguanli/quanjushanggoods',
        name: 'quanjushanggoods',
        component: () => import('../views/menu/choushangguanli/quanjushangx/QuanjushangGoodsList.vue')
      },
      //添加全局赏赏品
      {
        path: '/layout/choushangguanli/tianjiaquanjushangshangpin',
        name: 'addquanjushangshangpin',
        component: () => import('../views/menu/choushangguanli/quanjushangx/Tianjiaquanjushangshangpin.vue')
      },

      //抽赏记录
      {
        path: '/layout/choushangguanli/choushangjilu',
        name: 'choushangjilu',
        component: () => import('../views/menu/choushangguanli/Choushangjilu.vue')
      },
      //卡单记录
      {
        path: '/layout/choushangguanli/tilianjilu',
        name: 'tilianjilu',
        component: () => import('../views/menu/choushangguanli/Tilianjilu.vue')
      },
      // 财务明细
      {
        path: '/layout/caiwumingxi/rizhangdan',
        name: 'rizhangdan',
        component: () => import('../views/menu/caiwumingxi/Rizhangdan.vue')
      },
      {
        path: '/layout/caiwumingxi/yuezhangdan',
        name: 'yuezhangdan',
        component: () => import('../views/menu/caiwumingxi/Yuezhangdan.vue')
      },
      {
        path: '/layout/caiwumingxi/yuechongzhijilu',
        name: 'yuechongzhijilu',
        component: () => import('../views/menu/caiwumingxi/Yuechongzhijilu.vue')
      },
      {
        path: '/layout/caiwumingxi/hunjingtixianjilu',
        name: 'hunjingtixianjilu',
        component: () => import('../views/menu/caiwumingxi/Hunjingtixianjilu.vue')
      },

      //排行榜
      {
        path: '/layout/paihangbang/chongzhi',
        name: 'chongzhi',
        component: () => import('../views/menu/paihangbang/Chongzhipaihangbang.vue')
      },
      {
        path: '/layout/paihangbang/kuisun',
        name: 'kuisun',
        component: () => import('../views/menu/paihangbang/Kuisunpaihangbang.vue')
      },
      {
        path: '/layout/paihangbang/xiaofei',
        name: 'xiaofei',
        component: () => import('../views/menu/paihangbang/Xiaofeipaihangbang.vue')
      },

      //订单管理

      //预付订单列表
      {
        path: '/layout/dingdanguanli/yufudingdanliebiao',
        name: 'yufudingdanliebiao',
        component: () => import('../views/menu/dingdanguanli/Yufudingdan.vue')
      },
      //发货订单列表
      {
        path: '/layout/dingdanguanli/fahuodingdanliebiao',
        name: 'fahuodingdanliebiao',
        component: () => import('../views/menu/dingdanguanli/Fahuodingdan.vue')
      },

      //图片管理
      // 图片轮播
      {
        path: '/layout/tupianguanli/lunbotupian',
        name: '/lunbotupian',
        component: () => import('../views/menu/tupianguanli/Lunbotu.vue')
      },
      //配置规则

      //商城购买协议
      {
        path: '/layout/peizhiguize/shangchenggoumaixieyi',
        name: 'shangchenggoumaixieyi',
        component: () => import('../views/menu/peizhiguize/Shangchenggoumaixieyi.vue')
      },
      //抽赏玩法说明
      {
        path: '/layout/peizhiguize/choushangwanfa',
        name: 'choushangwanfa',
        component: () => import('../views/menu/peizhiguize/Choushangwanfa.vue')
      },
      //抽赏预售规则
      {
        path: '/layout/peizhiguize/choushangyushouguize',
        name: 'choushangyushouguize',
        component: () => import('../views/menu/peizhiguize/Choushangyushouguize.vue')
      },
      //无限赏玩法说明
      {
        path: '/layout/peizhiguize/wuxianshangwanfa',
        name: 'wuxianshangwanfa',
        component: () => import('../views/menu/peizhiguize/Wuxianshangwanfa.vue')
      },
      //保底赏玩法说明
      {
        path: '/layout/peizhiguize/baodishangwanfa',
        name: 'baodishangwanfa',
        component: () => import('../views/menu/peizhiguize/Baodishangwanfa.vue')
      },
      //开盒用户购买协议
      {
        path: '/layout/peizhiguize/kaihexieyi',
        name: 'kaihexieyi',
        component: () => import('../views/menu/peizhiguize/Kaihexieyi.vue')
      },
      //开盒用户购买说明
      {
        path: '/layout/peizhiguize/kaiheshuoming',
        name: 'kaiheshuoming',
        component: () => import('../views/menu/peizhiguize/Kaiheshuoming.vue')
      },
      //邀请好友规则
      {
        path: '/layout/peizhiguize/yaoqinghaoyou',
        name: 'yaoqinghaoyou',
        component: () => import('../views/menu/peizhiguize/Yaoqinghaoyou.vue')
      },
      //代理分佣规则
      {
        path: '/layout/peizhiguize/dailifenyong',
        name: 'dailifenyong',
        component: () => import('../views/menu/peizhiguize/Dailifenyong.vue')
      },
      //会员等级规则
      {
        path: '/layout/peizhiguize/huiyuandengji',
        name: 'huiyuandengjiguize',
        component: () => import('../views/menu/peizhiguize/Huiyuandengji.vue')
      },
      //余额充值规则
      {
        path: '/layout/peizhiguize/yuechongzhi',
        name: 'yuechongzhiguize',
        component: () => import('../views/menu/peizhiguize/Yuechongzhi.vue')
      },
      //赏袋发货须知
      {
        path: '/layout/peizhiguize/shangdaifahuo',
        name: 'shangdaifahuo',
        component: () => import('../views/menu/peizhiguize/Shangdaifahuo.vue')
      },
      //钓鱼玩法说明
      {
        path: '/layout/peizhiguize/diaoyuwanfa',
        name: 'diaoyuwanfa',
        component: () => import('../views/menu/peizhiguize/Diaoyuwanfa.vue')
      },
      //活动中心规则
      {
        path: '/layout/peizhiguize/huodongzhongxin',
        name: 'huodongzhongxin',
        component: () => import('../views/menu/peizhiguize/Huodongzhongxin.vue')
      },
      {//翻翻乐购买说明
        path: '/layout/peizhiguize/fanfanlegoumai',
        name: 'fanfanlegoumai',
        component: () => import('../views/menu/peizhiguize/Fanfanlegoumai.vue')
      },

      //设置管理

      //网站设置
      {
        path: '/layout/shezhiguanli/wangzhanshezhi',
        name: 'wangzhanshezhi',
        component: () => import('../views/menu/shezhiguanli/Wangzhanshezhi.vue')
      },
      //微信配置
      {
        path: '/layout/shezhiguanli/weixinpeizhi',
        name: 'weixinpeizhi',
        component: () => import('../views/menu/shezhiguanli/Weixinpeizhi.vue')
      },
      //系统公告
      {
        path: '/layout/shezhiguanli/xitonggonggao',
        name: 'xitonggonggao',
        component: () => import('../views/menu/shezhiguanli/Xitonggonggao.vue')
      },
    ]
  },
  //管理员管理
  {
    path: '/layout/guanliyuanguanli',
    name: 'guanliyuanguanli',
    children: [
      //管理员列表
      {
        path: '/layout/guanliyuanguanli/guanliyuan',
        name: 'guanliyuan',
        component: () => import('../views/menu/guanliyuanguanli/Guanliyuan.vue')
      },
      //角色列表
      {
        path: '/layout/guanliyuanguanli/juese',
        name: 'juese',
        component: () => import('../views/menu/guanliyuanguanli/Juese.vue')

      }
    ]
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
